server {
    listen  {{ port }};
    if ($time_iso8601 ~ "^(\d{4})-(\d{2})-(\d{2})") {
        set $year $1;
            set $month $2;
            set $day $3;
    }
    root {{ root }};
    index {{ index }};

    access_log /var/log/nginx/access_{{ project_name }}-$year-$month-$day.log;
    error_log /var/log/nginx/error_{{ project_name }}.log;

    error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
}
